<?php
require_once('auth.php');
?>
<!DOCTYPE html>
<html>
    <link type="text/css" rel="stylesheet" href="giftgiving.css"/>
    <!-- Uncomment the line below to include javascript in your webpage -->
    <!--<script type="text/javascript" src="giftgiving.js"/>-->
    <style type="text/css">
<!--
.STYLE1 {
	font-size: 18px;
	font-weight: bold;
}
.STYLE2 {font-size: 16px}
-->
    </style>
    <head>
        <title>Floral Home</title>
    </head>
    <body>
        <div id="gift-view-id">
            <!-------  Side bars  ----------------------------------------------------------->
			<div id="gift-navpane-id" class="gift-navpane">
    			<div id="gift-pets-id" class="gift-types gift-types">
                    <a href="cus_home.php" class="STYLE1">Home</a>				    </div>
    			<div id="gift-pets-id" class="gift-types">
                    <a href="cus_profile.php" class="STYLE1">My Profile</a>			</div>
				<div id="gift-pets-id" class="gift-types-selected">
                    <a href="cus_myOrder.php" class="STYLE1">My Order</a>			</div>
				<div id="gift-register-id" class="gift-types">
                    <a href="cus_reg.php" class="STYLE1">Register</a>    			</div>
    		</div>
			<!--------------Main Content----------------------------------------------------->
    		<div id="gift-choosepane-id" class="gift-choosepane">
               <!-- Note the onClick handler for this element -->
              <div id="gift-table" onClick="onGiftClick()">
        	   <?php
			   echo '<table>
        			<th colspan="8"><span class="STYLE2">My profile</span></th>
        		    <form action = "order.php" method = "post">';
					
					    $recName = $_POST['recName'];
						$recAddress = $_POST['recAddress'];
						$recPhoneNo = $_POST['recPhoneNo'];
						$deliverDate = $_POST['deliverDate'];
						$oid = $_POST['oid'];
						$num = $_POST['quantity'];
						unset($_POST);
						include("cus_getMyorder.php");
						$flowername = getFlowerName($oid);
						echo "<tr>
						          <td>The flower: ".$flowername."</td>
								  
							  </tr>";
					    $flowerpicture = getFlowerPicture($oid);
						echo "<tr>
						          <td> <img id='Socks' src='".$flowerpicture."'/></td>
							  </tr>";
						echo "<tr>
						          <td>Receiver Name: <input type='text' name='new_recName' value='$recName' required/></td>
							  </tr>";
        				echo "<tr>
						          <td>Receiver Address: <input type='text' name='new_recAddress' value='$recAddress' ></td>
							  </tr>";
						echo "<tr>
						          <td>Receiver PhoneNo: <input type='text' name='new_recPhoneNo' value='$recPhoneNo' ></td>
							  </tr>";
					    echo "<tr>
						          <td>DeliverDate: <input type='date' name='new_deliverDate' value='$deliverDate' ></td>
							  </tr>";
					    echo "<tr>
						          <td>Number: <input type='number' min='1' max='getQuantity(".$oid.")' name='new_num' value='$num' ></td>
							  </tr>";
						echo "<tr>
						          <input type='hidden' name='method' value='modifyOrder' >
								  <input type='hidden' name='oid' value='$oid' >
							  </tr>";
					echo'
        			<tr>
						<td><input type="submit" value="Confirm" /></td>
					
                  </form>
				  
				  <form action = "order.php" method = "post">
					<input type="hidden" name="method" value="deleteOrder">
					<input type="hidden" name="oid" value="'.$oid.'" >
				    <td><input type="submit" value="Cancel" /></td>
				  </form>
				  </tr>
        		</table>';
				?>

              </div>
    		</div>
        </div>
	</body>
<ml>